<#include "java_copyright.include">
<#assign className = table.className>   
<#assign classNameLower = className?uncap_first>
package ${basepackage}.${subpackage}.web.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
import org.apache.struts.action.ActionMessages;

import ${basepackage}.base.BaseDispatchAction;
import ${basepackage}.${subpackage}.service.I${className}Service;

public class ${className}Action extends BaseDispatchAction {

	private I${className}Service ${classNameLower}Service;

	public void set${className}Service(I${className}Service ${classNameLower}Service) {
		this.${classNameLower}Service = ${classNameLower}Service;
	}

	public ActionForward list(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {

		try {
			return mapping.findForward("list");
		} catch (Exception e) {
			log.error(e.toString());
			ActionMessages errors = new ActionMessages();
			errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("${classNameLower}.list.missing"));
			saveErrors(request, errors);
			return mapping.findForward("failure");
		}
	}

}
